Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

140
Views
JavaScript v8 Optimization Compiler | Monomorphism, Polymorphism?

Chrome V8 Optimization Compiler

Is there still a difference between Monomorphism, Polymorphism, and Megamorphism in speed, or not anymore?

Monomorphism => [{a:47}, {a:5}, {a:9}];
Polymorphism => [{a:1, b:65}, {c:22, a:57, d:8},{e:14, a:819}];
...
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

(V8 developer here.)

Yes, and it's safe to assume that there always will be.

What's much harder to say is whether it matters for your application. For instance, it depends on what you're doing. Putting different kinds of objects into an array doesn't make any difference at all; only accessing those objects' properties afterwards encounters the concept of polymorphism (e.g. if you have for (let o of array) { o.a = 42; } elsewhere -- the array doesn't care, the o.a part does).

Also, an effect that's clearly visible in a microbenchmark might only affect a large real-world application within the noise range (say, 1% or less). So it's usually not worth worrying about this, unless you have specific reason (such as: profiling results) to believe that it may be a problem in your case.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!